import request from '@/utils/request'

export function creatColumn(data) {
  return request({
    url: '/juanbusiness/content-column/add',
    method: 'post',
    data
  })
}

export function findColumn(id, name, usingStatus, nextPage, pageSize) {
  return request({
    url: '/juanbusiness/content-column/findPage',
    method: 'get',
    params: { id: id, name: name, usingStatus: usingStatus, nextPage: nextPage, pageSize: pageSize }
  })
}

export function updateColumn(data) {
  return request({
    url: '/juanbusiness/content-column/edit',
    method: 'put',
    data
  })
}

export function removedColumn(data) {
  return request({
    url: '/juanbusiness/content-column/remove',
    method: 'put',
    data
  })
}

export function releaseColumn(data) {
  return request({
    url: '/juanbusiness/content-column/enable',
    method: 'put',
    data
  })
}

export function getDirColumn(id) {
  return request({
    url: '/juanbusiness/content-column/getDir',
    method: 'get',
    params: {id: id}
  })
}

export function delColumn(id) {
  return request({
    url: '/juanbusiness/content-column/del',
    method: 'delete',
    params: {id: id}
  })
}
